package com.job.Yangmingyu.Zuoye0714;

/**
 * @author com.job.Yangmingyu
 * @version 1.0
 * @since 2022-07-14 20:20:53
 */
public class Beauty implements Cloneable{
    private String beautyname;
    private Cat cat;

    public Beauty() {
    }

    public Beauty(String beautyname, Cat cat) {
        this.beautyname = beautyname;
        this.cat = cat;
    }

    public String getBeautyname() {
        return beautyname;
    }

    public void setBeautyname(String beautyname) {
        this.beautyname = beautyname;
    }

    public Cat getCat() {
        return cat;
    }

    public void setCat(Cat cat) {
        this.cat = cat;
    }

    public static void main(String[] args) throws CloneNotSupportedException {
        Cat cat=new Cat("Tom");
        Beauty beauty=new Beauty("何",cat);
        Beauty clone= (Beauty) beauty.clone();

        System.out.println(beauty==clone);//F
        System.out.println(beauty.getCat()==clone.getCat());//T
    }
}